package syllabus.service.impl;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import syllabus.dao.PRoleMapper;
import syllabus.model.Criteria;
import syllabus.model.PRole;
import syllabus.model.PUser;
import syllabus.service.PRoleService;

@Service
public class PRoleServiceImpl implements PRoleService {
    @Autowired
    private PRoleMapper pRoleMapper;

    private static final Logger logger = LoggerFactory.getLogger(PRoleServiceImpl.class);

    public int countByExample(Criteria example) {
        int count = this.pRoleMapper.countByExample(example);
        logger.debug("count: {}", count);
        return count;
    }

    public PRole selectByPrimaryKey(Integer id) {
        return this.pRoleMapper.selectByPrimaryKey(id);
    }

    public List<PRole> selectByExample(Criteria example) {
        return this.pRoleMapper.selectByExample(example);
    }

    public int deleteByPrimaryKey(Integer id) {
        return this.pRoleMapper.deleteByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(PRole record) {
        return this.pRoleMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(PRole record) {
        return this.pRoleMapper.updateByPrimaryKey(record);
    }

    public int deleteByExample(Criteria example) {
        return this.pRoleMapper.deleteByExample(example);
    }

    public int updateByExampleSelective(PRole record, Criteria example) {
        return this.pRoleMapper.updateByExampleSelective(record, example);
    }

    public int updateByExample(PRole record, Criteria example) {
        return this.pRoleMapper.updateByExample(record, example);
    }

    public int insert(PRole record) {
        return this.pRoleMapper.insert(record);
    }

    public int insertSelective(PRole record) {
        return this.pRoleMapper.insertSelective(record);
    }

	public List<PRole> getRoles(Criteria c) {
		return pRoleMapper.getRoles(c);
	}
	

}